package com.ly.heart.service.impl;

import java.util.List;
import com.ly.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ly.heart.mapper.ProjectPersonnelEntityMapper;
import com.ly.heart.domain.ProjectPersonnelEntity;
import com.ly.heart.service.IProjectPersonnelEntityService;

/**
 * 项目人力明细Service业务层处理
 *
 * @author cxl
 * @date 2024-05-14
 */
@Service
public class ProjectPersonnelEntityServiceImpl implements IProjectPersonnelEntityService
{
    @Autowired
    private ProjectPersonnelEntityMapper projectPersonnelEntityMapper;

    /**
     * 查询项目人力明细
     *
     * @param id 项目人力明细主键
     * @return 项目人力明细
     */
    @Override
    public ProjectPersonnelEntity selectProjectPersonnelEntityById(String id)
    {
        return projectPersonnelEntityMapper.selectProjectPersonnelEntityById(id);
    }

    /**
     * 查询项目人力明细列表
     *
     * @param projectPersonnelEntity 项目人力明细
     * @return 项目人力明细
     */
    @Override
    public List<ProjectPersonnelEntity> selectProjectPersonnelEntityList(ProjectPersonnelEntity projectPersonnelEntity)
    {
        return projectPersonnelEntityMapper.selectProjectPersonnelEntityList(projectPersonnelEntity);
    }

    /**
     * 新增项目人力明细
     *
     * @param projectPersonnelEntity 项目人力明细
     * @return 结果
     */
    @Override
    public int insertProjectPersonnelEntity(ProjectPersonnelEntity projectPersonnelEntity)
    {
        projectPersonnelEntity.setCreateTime(DateUtils.getNowDate());
        return projectPersonnelEntityMapper.insertProjectPersonnelEntity(projectPersonnelEntity);
    }

    /**
     * 修改项目人力明细
     *
     * @param projectPersonnelEntity 项目人力明细
     * @return 结果
     */
    @Override
    public int updateProjectPersonnelEntity(ProjectPersonnelEntity projectPersonnelEntity)
    {
        return projectPersonnelEntityMapper.updateProjectPersonnelEntity(projectPersonnelEntity);
    }

    /**
     * 批量删除项目人力明细
     *
     * @param ids 需要删除的项目人力明细主键
     * @return 结果
     */
    @Override
    public int deleteProjectPersonnelEntityByIds(String[] ids)
    {
        return projectPersonnelEntityMapper.deleteProjectPersonnelEntityByIds(ids);
    }

    /**
     * 删除项目人力明细信息
     *
     * @param id 项目人力明细主键
     * @return 结果
     */
    @Override
    public int deleteProjectPersonnelEntityById(String id)
    {
        return projectPersonnelEntityMapper.deleteProjectPersonnelEntityById(id);
    }
}
